package com.wzh.advancelog.log.db;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

/**
 * @author: zhwang37
 * @date: 2021/8/30 19:44
 * @email:zhwang37@iflytek.com
 * @describe:
 */
@SuppressWarnings({"unused", "RedundantSuppression"})
@Dao
public interface LogDao {
    @Insert
    void insert(LogEntity logEntity);

    @Delete
    void delete(LogEntity logEntity);

    @Update
    void update(LogEntity logEntity);

    @Query("SELECT * From log WHERE logTime >:startLogTime order by logTime limit 10")
    List<LogEntity> getLogEntities(long startLogTime);
}
